#ifndef SYSTEM_SYSCALL_H
#define SYSTEM_SYSCALL_H

#define SYSCALL_NUMBER 			255

#define SYSCALL_FS_FOPEN		0x01
#define SYSCALL_FS_FCLOSE		0x02
#define SYSCALL_FS_FREAD		0x03
#define SYSCALL_FS_FWRITE		0x04
#define SYSCALL_FS_FSTAT		0x05
#define SYSCALL_FS_REMOVE		0x08
#define SYSCALL_FS_LINK			0x09
#define SYSCALL_FS_UNLINK		0x0A
#define SYSCALL_FS_MOUNT		0x0B
#define SYSCALL_FS_UMOUNT		0x0C
#define SYSCALL_FS_MAKEDIR		0x0D
#define SYSCALL_FS_STAT			0x0E
#define SYSCALL_FS_SET_STAT		0x0F

#define SYSCALL_TASK_FORK		0x21
#define SYSCALL_TASK_EXIT		0x22
#define SYSCALL_TASK_GETPID		0x23
#define SYSCALL_TASK_SBRK		0x24
#define SYSCALL_TASK_OUT		0x25
#define SYSCALL_TASK_IN			0x26
#define SYSCALL_TASK_EXEC		0x27

#define SYSCALL_NET_SEND		0x41
#define SYSCALL_NET_ACCEPT		0x42
#define SYSCALL_NET_BIND		0x43
#define SYSCALL_NET_LISTEN		0x44
#define SYSCALL_NET_SOCKET		0x45
#define SYSCALL_NET_CLOSE		0x46
#define SYSCALL_NET_RECV		0x47
#define SYSCALL_NET_CONNECT		0x48

#define SYSCALL_SYS_OUT			0xD1
#define SYSCALL_SYS_SHUTDOWN	0xD2


#define SYSCALL_INT				0x84

#include <klibc/ctype.h>
#include <system/regs.h>


void syscall_callback(regs_t *);
void syscall_call(uint32_t, uint32_t, uint32_t, uint32_t);
uint32_t syscall_init();
uint32_t syscall_shut();

#endif
